package com.seadragon.app.ksr.util;

import java.util.List;

import com.seadragon.app.ksr.model.Business;
import com.seadragon.app.ksr.model.Customer;
import com.seadragon.app.ksr.model.Event;
import com.seadragon.app.ksr.model.Office;
import com.seadragon.app.ksr.model.Review;
import com.seadragon.app.ksr.model.tiger.County;
import com.seadragon.app.ksr.model.tiger.Place;
import com.seadragon.app.ksr.model.tiger.State;
import com.seadragon.app.ksr.model.tiger.Zip;

public interface IndexManager {
	void deleteDocument(String indexName, String typeName, long id);

	void insertDocument(Office office) throws Exception;
	
	void insertDocument(Event event) throws Exception;
	
	void insertBulkOfficeDocuments(List<Office> officeList) throws Exception;

	void insertDocument(Business business) throws Exception;

	void insertBulkBusinessDocuments(List<Business> businessList) throws Exception;

	void insertDocument(Customer customer) throws Exception;

	void insertBulkCustomerDocuments(List<Customer> customerList) throws Exception;

	void insertDocument(Review review) throws Exception;

	void insertBulkReviewDocuments(List<Review> reviewList) throws Exception;

	void insertDocument(State state) throws Exception;

	void insertBulkStateDocuments(List<State> stateList) throws Exception;

	void insertBulkCountyDocuments(List<County> countyList) throws Exception;

	void insertDocument(County county) throws Exception;

	void insertDocument(Place place) throws Exception;

	void insertBulkPlaceDocuments(List<Place> placeList) throws Exception;

	void insertDocument(Zip zip) throws Exception;

	void insertBulkZipDocuments(List<Zip> zipList) throws Exception;

	void indexAll();

	void createAllMappings();

	void createIndex(String indexName);

	void deleteIndex(String indexName);

	void deleteDocuments(String indexName);

	void deleteDocuments(String indexName, String typeName);

	void deleteIndex(String indexName, String typeName);

	void reindex(String indexName);

	void reindex(String indexName, String typeName);

	void reindexReview();

	void reindexCustomer();

	void reindexOffice();

	void reindexEvent();

	void insertBulkEventDocuments(List<Event> eventList) throws Exception;
	
	void reindexBusiness();

	void rebuildIndex(String indexName);

	void rebuildIndex(String indexName, String typeName);
}